package com.example.hehecat.yuejian1.mvp.model;


import com.example.hehecat.yuejian1.http.RetrofitHttp;
import com.example.hehecat.yuejian1.mvp.contract.LoginContract;
import com.example.hehecat.yuejian1.mvp.model.bean.UserBean;

import okhttp3.OkHttpClient;
import retrofit2.Callback;

/**
 * Created by hehecat on 2017/11/30.
 */

public class LoginModel implements LoginContract.Model {
    @Override
    public void login(String username, String password, Callback<UserBean> callback) {
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        RetrofitHttp.getRetrofit(builder).login(username, password)
                .enqueue(callback);
    }
}
